
const start = ['http', 'blob', 'data:image']

export const addBaseUrl = (url: string, basePrefix: string) => {
    if (!url) return ''
    if (start.some(item => url.startsWith(item))) return url
    if (url.startsWith('/')) return basePrefix + url
    return url
}